<?php
 Session_Start () ;
 $_SESSION ["repertoire_config"] = "../../include" ; 
 Include ("../../include/garennes.cfg") ;
 Include ("../../include/init.php") ;
 Include ("../include/config.inc") ;
 verif_droits ($droit_courant, $_SESSION ["code"]) ;

 $nombre = var_courante ("nombre", 0, 0) ;

 // Purge des anciens eleves
 For ($i = 1 ; $i <= $nombre ; $i++)
  {
   //$id_eleve = "\$id_eleve_".$i ; Eval ("\$id_eleve = \"$id_eleve\" ;") ;
   $id_eleve = var_courante ("id_eleve_".$i, 0, 0) ;
   If ($id_eleve > 0) { $ok = SQL_commande ("DELETE FROM eleves WHERE id_eleve='".$id_eleve."' LIMIT 1", $id_sql) ; }
  }

 $resultats = SQL_commande ("SELECT * FROM menus WHERE numero='".$droit_courant."' AND ordre='0'", $id_sql) ;
 $l = SQL_tableau_associatif ($resultats, "") ; 
 
 Echo "<HTML><HEAD>" ;
 entete_html ("Garennes", "", 1) ;
 Echo styles ("none", "none", "none", $l ["lien"], "none") ;
 Echo "</HEAD>" ;
 
 Echo "<BODY BACKGROUND=\"../images/fond.png\" TEXT=\"#000000\" onContextMenu=\"return false\">" ;
 Echo "<CENTER><FONT COLOR=\"#0000FF\">Purge&nbsp;des&nbsp;&eacute;l&egrave;ves&nbsp;</FONT></CENTER><BR>" ;
 Echo "<TABLE BORDER=\"1\" BGCOLOR=\"".$l ["lien"]."\" CELLPADDING=\"0\" CELLSPACING=\"0\" ALIGN=\"CENTER\" STYLE=\"border:1px solid #000000;border-collapse:collapse\">" ;
 Echo "<TR>" ;
 Echo "<TD>" ;
 Echo "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\" STYLE=\"border-collapse:collapse\">" ;
 Echo "<TR>" ;
 Echo "<TD COLSPAN=\"3\" ALIGN=\"CENTER\" BGCOLOR=\"".$l ["couleur_fond"]."\">" ;
 Echo "&nbsp;Purge des anciens &eacute;l&egrave;ves effectu&eacute;e&nbsp;" ;
 Echo "</TD>" ;
 Echo "</TR>" ;
 Echo "<TR><TD COLSPAN=\"3\"><BR><BR></TD></TR>" ;
 Echo "<TR>" ;
 Echo "<TD COLSPAN=\"3\" ALIGN=\"CENTER\">" ;
 Echo "<BR>&nbsp;Si des notes ont &eacute;t&eacute; d&eacute;j&agrave; saisies,<BR>vous devez v&eacute;rifier la base :<BR><BR>&nbsp;" ;
 Echo "<FORM ACTION=\"./verif_notes.php\" METHOD=\"POST\"><INPUT TYPE=\"HIDDEN\" NAME=\"verif\" VALUE=\"-2\">" ;
 Echo "<INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\" V&eacute;rifier la base... \"></FORM><BR>&nbsp;" ;
 Echo "</TD></TR></TABLE>" ;
 Echo "</TD></TR></TABLE>" ;
 Echo "</BODY></HTML>" ;
?>